<?php

namespace App\Models\Applet\Sponsor;

class SlaughterExpressModel extends BaseSponsorModel
{
    protected $table = 'slaughter_express';

    /**
     * 根据订单号查询数据
     * @return void
     */
    public function getItemByExpressNo(string $expressNo, array $fields = self::QUERY_DEFAULT_FIELDS): array
    {
        $result = $this->select($fields)
                       ->where('express_no', $expressNo)
                       ->where('deleted', self::DELETED_NO)
                       ->first();

        return $result ? $result->toArray() : [];
    }
}
